<!doctype html>
<html>
  <head>
    <!-- Global site tag (gtag.js) - Google Analytics -->
    <script async src='https://www.googletagmanager.com/gtag/js?id=UA-132775238-1'></script>
    <script>
      window.dataLayer = window.dataLayer || [];
      function gtag(){dataLayer.push(arguments);}
      gtag('js', new Date());
      gtag('config', 'UA-132775238-1');
    </script>
    <meta charset='utf-8'>
    <meta name='viewport' content='width=device-width, minimum-scale=1, initial-scale=1, user-scalable=yes'>
    <link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;600&family=Roboto+Mono&display=swap" rel="stylesheet">
    <script type='text/javascript' src='../rapidoc-min.js'></script>
    <script>
      function getRapiDoc(){
        return document.getElementById("thedoc");
      }
      
      function toggleSchemaStyle (attr) {
        if (getRapiDoc().getAttribute(attr) === 'table') {
          getRapiDoc().setAttribute(attr, 'tree');
        } else {
          getRapiDoc().setAttribute(attr, 'table');
        }
      }
    </script>
    <style>
      .btn{
        width: 70px;
        height: 70px;
        background-color: #47AFE8;
        color: #fff;
        font-size: 12px;
        display: block;
        border: none;
        margin: 2px;
        border-radius: 2px;
        cursor:pointer;
        outline:none;
      }
      rapi-doc{
        width:100%;
      }
    </style>
  </head>
  <body>
    <rapi-doc spec-url="../specs/oneof-titles.json" 
      id="thedoc"
      show-info = "false"
      show-header = "false"
      render-style = "read"
      allow-try = "false"
      schema-style = "table"
      regular-font = 'Open Sans'
      mono-font = "Roboto Mono"
      allow-authentication = "false" 
    >
      <div style="display:flex; margin:10px; justify-content:center;flex-wrap: wrap;">
        <button class="btn" onclick="toggleSchemaStyle('schema-style')">Toggle Schema Style</button>
      </div>
    </rapi-doc>
  </body>
</html>
